<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
    <title>公共配置表</title>
    <%@ include file="../../include/head.jsp"%>
</head>
<body>
<div class="admin-content">
    <div class="am-g">
        <div class="am-u-sm-12">
            <div class="am-panel-group" id="accordion">
                <div class="am-panel am-panel-default">
                    <div class="am-panel-hd">
                        <h4 class="am-panel-title" data-am-collapse="{parent: '#accordion', target: '#tab1'}">
                            查询条件
                        </h4>
                    </div>
                    <div id="tab1" class="am-panel-collapse am-collapse am-in">
                        <div class="am-panel-bd">
                            <form id="searchForm" class="am-form-inline" action="${ctx}/config" method="post">
                                <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                                <div class="am-form-group">
                                    <label>系统名称</label>
                                    <input type="text" name="sysName" value="${page.entity.sysName}" class="am-form-field">
                                </div>
                                <div class="am-form-group">
                                    <label>模块名称</label>
                                    <input type="text" name="moduleName" value="${page.entity.moduleName}" class="am-form-field">
                                </div>
                                <div class="am-form-group">
                                    <button type="submit" class="am-btn am-btn-success" onclick="initSearchForm()"><i class="am-icon-search"></i> 查询</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class="am-panel am-panel-default">
                <div class="am-panel-hd">
                    <h4 class="am-panel-title">
                        查询列表
                        <button type="button" class="am-btn am-btn-primary am-btn-xs iu-right"
                                onclick="openModel('新增','${ctx}/config/create')"><span class="am-icon-plus"></span> 新增
                        </button>
                    </h4>
                </div>
                <div class="am-panel-collapse am-collapse am-in">
                    <div class="am-panel-bd">
                        <div class="am-g">
                            <div class="am-u-sm-12">
                                <table class="am-table am-table-striped am-table-hover table-main">
                                    <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>系统名称</th>
                                        <th>模块名称</th>
                                        <th>key</th>
                                        <th>value</th>
                                        <th>备注</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <c:forEach items="${page.list}" var="config" varStatus="status">
                                        <tr>
                                            <td>${status.index+1}</td>
                                            <td>${config.sysName}</td>
                                            <td>${config.moduleName}</td>
                                            <td>${config.configName}</td>
                                            <td>${config.configValue}</td>
                                            <td>${config.remarks}</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary" onclick="openModel('编辑','${ctx}/config/update?id=${config.id}')"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only" onclick="iuConfirm('确认要删除该条数据吗？', '${ctx}/config/delete?id=${config.id}&pageNo=${page.pageNo}&pageSize=${page.pageSize}')"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                    </c:forEach>
                                    </tbody>
                                    </tbody>
                                </table>
                            </div>
                            <div class="am-u-sm-12">
                                <%@ include file="../../utils/pagination.jsp" %>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<%@ include file="../../include/bottom.jsp"%>
<script type="text/javascript">
    $(document).ready(function () {
        var msg = '${msg}';
        if(msg!=''){
            iuMsg(msg);
        }
    });
</script>
</body>
</html>
